Skip to content

Conversation

@ArtifactForms
Copy link
Owner

No description provided.

ArtifactForms and others added 17 commits December 13, 2024 19:14
Separation

- Split the beveling workflow into clear, modular methods for better
readability.
- Added `modifyWorkflow()` to encapsulate the entire beveling process
sequence.
- Improved edge point creation with dedicated logic in
`generateEdgePointsForFaces`.
- Introduced `clear()` to reset all related data structures before
processing.
- Updated traversal logic to ensure edge processing is more structured
and efficient.
- Removed redundant utility methods in favor of streamlined logic with
clearer names.
- Enhanced error handling with checks (e.g., null checks for meshes).
- Improved the use of helper methods (`toReverseArray`) for geometry
transformations.
    Introduced default values for size and height to simplify
initialization.
    Replaced deprecated mesh operations with TranslateModifier and
RotateModifier for cone transformations.
    Modularized rendering logic by introducing renderMesh to reduce
redundancy and improve readability.
    Centralized cone creation logic in createCone for better code reuse
and consistency.
    Enhanced method and variable naming for clarity.
- Updated class name from `ViewGizmo` to `ViewportCompass` to better
reflect its purpose as a non-interactive orientation indicator for the
viewport.
- Adjusted references and comments to align with the new name.
- Switched to `Vector3f` for cleaner rotation handling.
- Centralized rotation updates using `setRotation(Vector3f)` with
clamping logic to ensure safe ranges (-π, π).
- Removed individual axis setter methods for simplicity and better
maintainability.
- Documented the purpose of the `ViewportCompass` class.
- Added JavaDoc for all methods to explain their purpose, parameters,
and logic.
- Improved maintainability and developer clarity by providing context
for each helper method and transformations.
- Restructured package hierarchy to better organize framework
components.
- Decoupled core UI logic from Processing-specific implementations,
paving the way for broader flexibility and rendering backends.
- Began transforming library from a prototype to a robust, extensible UI
framework.
  - Introduced abstract base classes and interfaces for key components.
  - Updated existing components to align with the new architecture.
- Enhanced modularity by improving separation of concerns:
  - Moved rendering logic to dedicated `Renderer` classes.
- Improved code clarity and maintainability with better encapsulation
and naming conventions.
- Added comprehensive JavaDocs to foundational classes for improved
readability and usability.

This commit marks the foundational shift from a prototype to a polished
framework capable of supporting future scalability and flexibility.
Follow-up commits will address integration, performance tuning, and
additional feature development.
- Introduced `Light` interface to define common properties and behavior
for all light types.
- Added `LightRenderer` interface to decouple rendering logic for
different light types.
- Implemented `DirectionalLight` for uniform parallel lighting,
typically used for simulating sunlight.
- Implemented `PointLight` for omnidirectional light sources.
- Implemented `Spotlight` for directional lighting with limited cone
angles.
- Added `LightType` enum to categorize and identify light types.

This commit establishes a flexible and extensible lighting system,
enabling dynamic light management and rendering in the scene graph.
@ArtifactForms ArtifactForms merged commit 0bd6d6b into master Dec 14, 2024
2 of 3 checks passed
g.textAscent() + g.textDescent() + padding + padding);
g.setColor(foreground);
g.text(text, padding, y + g.getTextSize() + padding);
y += g.getTextSize() + gap + padding + padding;

Check failure

Code scanning / CodeQL

Implicit narrowing conversion in compound assignment High

Implicit cast of source type float to narrower destination type
int
.

Copilot Autofix

AI 12 months ago

To fix the problem, we need to ensure that the type of the left-hand side of the compound assignment statement is at least as wide as the type of the right-hand side. In this case, we should change the type of y from int to float to match the type of the expression g.getTextSize() + gap + padding + padding.

  • Change the declaration of y from int to float on line 27.
  • This change ensures that the addition operation and the assignment do not involve any implicit narrowing conversion, thus preserving the precision of the float values.
Suggested changeset 1
src/main/java/workspace/ui/UiSimpleList.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/main/java/workspace/ui/UiSimpleList.java b/src/main/java/workspace/ui/UiSimpleList.java
--- a/src/main/java/workspace/ui/UiSimpleList.java
+++ b/src/main/java/workspace/ui/UiSimpleList.java
@@ -26,3 +26,3 @@
 	public void renderSelf(Graphics g) {
-		int y = 300;
+		float y = 300;
 		int padding = 5;
EOF
@@ -26,3 +26,3 @@
public void renderSelf(Graphics g) {
int y = 300;
float y = 300;
int padding = 5;
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants